package com.hanoi.wiki.model.json;

import java.io.Serializable;
import java.util.List;

import com.hanoi.wiki.model.CategorySubType;
import com.hanoi.wiki.model.CategoryType;

public class CategorySubTypeJson extends BaseJsonObject implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private int id;
	private String subTypeName;
	private int status;
	private List<Integer> categoryTypes;
	
	public CategorySubTypeJson() {
	}
	
	public CategorySubTypeJson(CategorySubType subType) {
		if(subType != null) {
			this.id = subType.getId();
			this.subTypeName = subType.getSubTypeName();
			this.status = subType.getStatus();
			
			for(CategoryType categoryType : subType.getCategoryTypes()) {
				if(categoryType != null) {
					categoryTypes.add(categoryType.getId());
				}
			}
		}
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getSubTypeName() {
		return subTypeName;
	}
	public void setSubTypeName(String subTypeName) {
		this.subTypeName = subTypeName;
	}
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}
	public List<Integer> getCategoryType() {
		return categoryTypes;
	}
	public void setCategoryType(List<Integer> categoryTypes) {
		this.categoryTypes = categoryTypes;
	}
	
	
}	
